#ifndef MYOBJECT_H
#define MYOBJECT_H

#include <QObject>
#include <QDebug>

class MyObject : public QObject
{
    Q_OBJECT
    Q_PROPERTY(int count READ getCount WRITE setCount);

public:
    explicit MyObject(QObject *parent = nullptr): QObject(parent)
    {}

    ~MyObject()
    {
        qDebug()<<"~MyObject()";
    }

    int getCount()const
    {
        return m_count;
    }


signals:
    void someSignal(int i);
    void someVaraintSignal(const QVariant& val); //QVariantList, QVaraintMap, QVariantHash

public slots:
    void someSlot(int i)
    {
        qDebug()<<"value "<<i<<" reseaved";
    }

    void slotWithoutParameters()
    {
        qDebug()<<"slotWithoutParameters called";
    }

    void setCount(int i)
    {
        qDebug()<<"setCount "<<i;
        m_count = i;
    }

private:
    int m_count = 5;

};

#endif // MYOBJECT_H
